// vite.config.mjs
import { resolve } from "path";
import { defineConfig, loadEnv } from "file:///E:/%E6%A1%8C%E9%9D%A2/new_codemall/codemall_admin/node_modules/vite/dist/node/index.js";
import vue from "file:///E:/%E6%A1%8C%E9%9D%A2/new_codemall/codemall_admin/node_modules/@vitejs/plugin-vue/dist/index.mjs";
import Components from "file:///E:/%E6%A1%8C%E9%9D%A2/new_codemall/codemall_admin/node_modules/unplugin-vue-components/dist/vite.js";
import VueJSX from "file:///E:/%E6%A1%8C%E9%9D%A2/new_codemall/codemall_admin/node_modules/@vitejs/plugin-vue-jsx/dist/index.mjs";
import AutoImport from "file:///E:/%E6%A1%8C%E9%9D%A2/new_codemall/codemall_admin/node_modules/unplugin-auto-import/dist/vite.js";
import vueSetupExtend from "file:///E:/%E6%A1%8C%E9%9D%A2/new_codemall/codemall_admin/node_modules/vite-plugin-vue-setup-extend/dist/index.mjs";
import { visualizer } from "file:///E:/%E6%A1%8C%E9%9D%A2/new_codemall/codemall_admin/node_modules/rollup-plugin-visualizer/dist/plugin/index.js";
import Less2CssVariablePlugin from "file:///E:/%E6%A1%8C%E9%9D%A2/new_codemall/codemall_admin/node_modules/antd-less-to-css-variable/dist/index.js";
import viteCompression from "file:///E:/%E6%A1%8C%E9%9D%A2/new_codemall/codemall_admin/node_modules/vite-plugin-compression/dist/index.mjs";
var __vite_injected_original_dirname = "E:\\\u684C\u9762\\new_codemall\\codemall_admin";
var r = (...args) => resolve(__vite_injected_original_dirname, ".", ...args);
var vite_config_default = defineConfig(({ command, mode }) => {
  const envConfig = loadEnv(mode, "./");
  const alias = {
    "~": `${resolve(__vite_injected_original_dirname, "./")}`,
    "@/": `${resolve(__vite_injected_original_dirname, "src")}/`
  };
  return {
    server: {
      port: envConfig.VITE_PORT
      // proxy: {
      // 	'/api': {
      // 		target: envConfig.VITE_API_BASEURL,
      // 		ws: false,
      // 		changeOrigin: true,
      // 		rewrite: (path) => path.replace(/^\/api/, '')
      // 	}
      // }
    },
    resolve: {
      alias
    },
    // 解决警告You are running the esm-bundler build of vue-i18n.
    define: {
      __VUE_I18N_FULL_INSTALL__: true,
      __VUE_I18N_LEGACY_API__: true,
      __VUE_I18N_PROD_DEVTOOLS__: true
    },
    build: {
      // sourcemap: true,
      manifest: true,
      brotliSize: false,
      rollupOptions: {
        output: {
          manualChunks: {
            echarts: ["echarts"],
            "ant-design-vue": ["ant-design-vue"],
            vue: ["vue", "vue-router", "pinia", "vue-i18n"]
          }
        }
      },
      chunkSizeWarningLimit: 1e3
    },
    plugins: [
      vue({
        script: {
          refTransform: true
        }
      }),
      viteCompression(),
      vueSetupExtend(),
      VueJSX(),
      AutoImport({
        imports: ["vue"],
        dirs: ["./src/utils/permission"],
        dts: r("src/auto-imports.d.ts")
      }),
      // 组件按需引入
      Components({
        dirs: [r("src/components")],
        dts: false,
        resolvers: []
      }),
      visualizer()
    ],
    css: {
      preprocessorOptions: {
        less: {
          javascriptEnabled: true,
          plugins: [new Less2CssVariablePlugin()]
        }
      }
    },
    optimizeDeps: {}
  };
});
export {
  vite_config_default as default,
  r
};
//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsidml0ZS5jb25maWcubWpzIl0sCiAgInNvdXJjZXNDb250ZW50IjogWyJjb25zdCBfX3ZpdGVfaW5qZWN0ZWRfb3JpZ2luYWxfZGlybmFtZSA9IFwiRTpcXFxcXHU2ODRDXHU5NzYyXFxcXG5ld19jb2RlbWFsbFxcXFxjb2RlbWFsbF9hZG1pblwiO2NvbnN0IF9fdml0ZV9pbmplY3RlZF9vcmlnaW5hbF9maWxlbmFtZSA9IFwiRTpcXFxcXHU2ODRDXHU5NzYyXFxcXG5ld19jb2RlbWFsbFxcXFxjb2RlbWFsbF9hZG1pblxcXFx2aXRlLmNvbmZpZy5tanNcIjtjb25zdCBfX3ZpdGVfaW5qZWN0ZWRfb3JpZ2luYWxfaW1wb3J0X21ldGFfdXJsID0gXCJmaWxlOi8vL0U6LyVFNiVBMSU4Q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